package com.mingxingyi.base.context;



public class AppletContext {

    private static ThreadLocal<Integer> userIdThreadLocal = ThreadLocal.withInitial(() -> 0);


    public static void setCurrentUserId(Integer userId) {
        userIdThreadLocal.set(userId);
    }

    public static Integer getCurrentUserId() {
        return userIdThreadLocal.get();
    }

    public static void removeCurrentUserId(){
        userIdThreadLocal.remove();
    }
}
